﻿using System;
using System.Web;


namespace UniversityPortal.Models
{
    public class SessionWrapper
    {
        private readonly HttpSessionStateBase _session;

        public SessionWrapper(HttpSessionStateBase session)
        {
            _session = session;
        }

        /// <summary>
        /// Property give Current User ID
        /// </summary>
        public Guid CurrentUserID
        {
            get 
            {
                try
                {
                    return Guid.Parse(_session["userID"].ToString());
                }
                catch
                {
                    return Guid.Empty;
                }
            }
        }
    }
}